package com.ds.extend.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;


/*
 * public void contextInitialized(ServletContextEvent event)：在ServletContext被创建时调用
   public void contextDestroyed(ServletContextEvent event)：在ServletContext被销毁时调用
 */
@WebListener
public class ServletContextListenerTest implements ServletContextListener {

//    @Autowired
//    private UserMapper userMapper;

    @Override
    public void contextInitialized(ServletContextEvent event) {
        System.out.println("*************ServletContextListener start************");

    }

    @Override
    public void contextDestroyed(ServletContextEvent event) {
        System.out.println("*************ServletContextListener stop************");
    }

}
